branchwiseguys/main/Item Managementcancel

4 Commits over 0 Days - ∞cph!

7 Years Ago
More fixes. Everything tested and seemingly OK now.
7 Years Ago
Minor fix
7 Years Ago
Testing and fixing bugs in item stuff. Moved multi-item stack creation method from ItemEx to the main ItemManager.
7 Years Ago
Various refactoring to alleviate issues with items and ItemContainers. Still needs proper testing so this commit likely has bugs. Includes: - Added differentiation between TAKING from ItemContainer and FINDING (getting info) in inventory. - Fixed: ItemContainer's Find method was removing inventory items if the stack had to be split. - Added protection for items containing more than maxAmount or less than 1. - Fixed: Guns allowed items with 0 amount, where nothing else allowed below 1. - New helper methods in ItemEx for consolidating items into stacks. - New helper method in ItemEx for creating any amount of an item, respecting maxAmount and creating multiple if needed. - Added warning in ItemManager if CreateItem is called with an amount > maxAmount, causing the amount to be clamped. - Removed old methods in Item that did nothing or were unused.